import { connect } from "dva";
import styles from "./index.less";
import { WingBlank, InputItem, Button, Toast } from "antd-mobile";
import router from "umi/router";
function App({ resetPwdSuccess, dispatch }) {
  const { text, list } = resetPwdSuccess;

  function successToast() {
    Toast.success("重置成功", 1);
    router.push("login");
  }

  return (
    <div className={styles.normal}>
      <WingBlank>
        <div className={styles.first}>
          <InputItem
            type="password"
            defaultValue="12345678"
            clear
            placeholder="请输入新密码"
          />
        </div>
      </WingBlank>

      <WingBlank>
        <div className={styles.second}>
          <InputItem
            type="password"
            defaultValue="12345678"
            className={styles.input_style}
            clear
            placeholder="确认新密码"
          />
        </div>
      </WingBlank>

      <WingBlank>
        <div className={styles.third}>
          <Button className={styles.button} onClick={successToast}>
            提交
          </Button>
        </div>
      </WingBlank>
    </div>
  );
}
export default connect(({ resetPwdSuccess }) => ({ resetPwdSuccess }))(App);
